From ca89ad75b4b43be2155b1a9f59802adaf191c566 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 25 Oct 2017 14:21:38 +0200 Subject: [PATCH] gdk: Remove gdk_event_is_allocated() All events are allocated now. --- gdk/gdkevents.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 80f92ec6a6..44e660c7ba 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -376,8 +376,6 @@ gdk_event_handler_set (GdkEventFunc func, _gdk_event_notify = notify; } -static GHashTable *event_hash = NULL; - /** * gdk_event_new: * @type: a #GdkEventType @@ -393,14 +391,9 @@ GdkEvent* gdk_event_new (GdkEventType type) { GdkEvent *new_event; - - if (!event_hash) - event_hash = g_hash_table_new (g_direct_hash, NULL); new_event = g_object_new (GDK_TYPE_EVENT, NULL); - g_hash_table_insert (event_hash, new_event, GUINT_TO_POINTER (1)); - new_event->any.type = type; /* @@ -474,15 +467,6 @@ gdk_event_new (GdkEventType type) return new_event; } -static gboolean -gdk_event_is_allocated (const GdkEvent *event) -{ - if (event_hash) - return g_hash_table_lookup (event_hash, event) != NULL; - - return FALSE; -} - void gdk_event_set_pointer_emulated (GdkEvent *event, gboolean emulated) @@ -596,8 +580,7 @@ gdk_event_copy (const GdkEvent *event) break; } - if (gdk_event_is_allocated (event)) - _gdk_display_event_data_copy (gdk_event_get_display (event), event, new_event); + _gdk_display_event_data_copy (gdk_event_get_display (event), event, new_event); return new_event; } @@ -683,8 +666,6 @@ gdk_event_finalize (GObject *object) g_clear_object (&event->any.device); g_clear_object (&event->any.source_device); - g_hash_table_remove (event_hash, event); - G_OBJECT_CLASS (gdk_event_parent_class)->finalize (object); } -- 2.30.2